<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateElOrderPaymentDetailTable extends Migration
{
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('el_order_payment_detail', function (Blueprint $table) {
			$table->increments('id');
			$table->unsignedInteger('order_id');
			$table->unsignedInteger('total_amount')->comment('总额');
			$table->unsignedInteger('wipe')->default(0)->comment('抹零');
			$table->unsignedInteger('actual')->comment('实收');
			$table->unsignedInteger('remaining')->default(0)->comment('找零');
			$table->timestamps();
			$table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::dropIfExists('el_order_payment_detail');
	}
}
